1. Field of the Invention
The present invention relates to an image processing apparatus which compresses image data.
2. Related Background Art
In conventional digital cameras, the amount of data on a photographed image is reduced by an image compression technique such as one proposed by JPEG (Joint Photographic Experts Group) before being recorded on a recording medium or being output to a transmission path. FIG. 11 is a block diagram schematically showing the configuration of a conventional digital camera.
An image pickup unit 110 is constituted by a photographing lens, an image pickup device, and a circuit for driving the image pickup device. An optical image imaged by the photographing lens is converted into an electrical signal by the image pickup device.
An original image processing circuit 112 converts the image signal from the image pickup unit 110 into digital data, and performs, as a preparation for dark correction, extraction of pixel data from shaded portions and flaw position detection for flaw correction, and then writes data obtained at this stage a buffer memory 114.
The buffer memory 114 has such a capacity as to be capable of storing an amount of data corresponding to a plurality of frames each read out as a unit amount of photography data from the image pickup device of the image pickup unit 110. It is necessary to set the capacity of the buffer memory 114 to a substantially large value such that the continuous shooting operation, i.e., repeating the photographing operation a certain number of times in a short time period, is not limited by the speed of processing in following stages (format conversion, compression coding, recording on a recording medium).
The original image processing circuit 112 reads out the image data stored in the buffer memory 114 and performs processing for correction including shading correction, dark correction, and flaw correction.
An image processing circuit 116 performs, on image data output from the original image processing circuit 112, a well-known processing such as white balancing, color interpolation processing, and pseudo color processing.
A YUV conversion circuit 118 converts image data output from the image processing circuit 116 from RGB format into YUV format. A JPEG encoding processing circuit 120 performs JPEG compression coding on image data output from the YUV conversion circuit 118. A image size reduction processing circuit 122 forms a thumbnail image by reducing the size of image data output from the YUV conversion circuit 118. A JPEG encoding processing circuit 124 performs JPEG compression coding on the thumbnail image from the image size reduction processing circuit 122.
The groups of image data respectively compressed by the JPEG encoding processing circuits 120 and 124 are selected alternately or according to a suitable timing by a selector 126 to be supplied and written in a storage 128. The image data compressed by the JPEG encoding processing circuit 120 forms a main image mainly to be displayed, edited and printed, for example, while the image data compressed by the JPEG encoding processing circuit 124 forms a sub image mainly to be viewed in a search or viewed in a browsing manner, for example.
A control circuit 130 constituted by a microcomputer controls the section formed by the YUV conversion circuit 118, the JPEG encoding processing circuit 120, the image size reduction processing circuit 122, the JPEG encoding processing circuit 124, and the selector 126. The control circuit 130 adds attribute information, i.e., photography date information to the image data compressed by the JPEG encoding processing circuit 120 by setting the attribute data before and after the image data, and stores the image data with attribute information in the storage 128. The control circuit 130 controls the conditions of encoding in the JPEG encoding processing circuits 120 and 124 so that the amount of data after compression may be equal to the desired value.
An image size reduction processing circuit 132 reduces the size of image data output from the image processing circuit 116 to a displayed size and stores the reduced image data in a display memory 134. The image data stored in the display memory 134 is read out at a constant rate to be supplied to a liquid crystal display panel 136 to display thereon an image corresponding to the optical image incident upon the image pickup unit 110.
In the conventional art, a photographed image is read out from the buffer memory 114 to be stored as a main image in the storage 128 via the original image processing circuit 112, the image processing circuit 116, the YUV conversion circuit 118, the JPEG encoding processing circuit 120, and the selector 126. Thereafter, the same image is read out from the buffer memory 114 to be stored as a sub image in the storage 128 via the original image processing circuit 112, the image processing circuit 116, the YUV conversion circuit 118, the image size reduction processing circuit 122, the JPEG encoding processing circuit 124 and the selector 126.
In the storage 128, the main image data and the sub image data are treated as image files independent of each other but are managed by being related to each other.
Thus, the two independent JPEG encoding circuits 120 and 124 are provided in order to produce two groups of image data from one photographed image. This arrangement is advantageous in terms of facility with which the system for storing data in the storage 128 is controlled. However, it has a drawback of increasing the circuit scale.
To enable image data stored in the storage 128 to be used in an external device (e.g., a computer), the storage medium in the storage 128 is removed and connected to the external device, or the image data is transferred to the external device through a communication cable (not shown). In either case, it is necessary for the external device to have an image expansion function in accordance with a compression format. If an encoding system generally used is used as encoding processing circuit 120, external devices can easily be provided with the corresponding expansion means. However, a special encoding system is often adopted as encoding processing circuit 120 by considering recording efficiency.
On the other hand, an image pickup apparatus has been proposed which produces a plurality of groups of image data that differ in image format and in encoding format from one photographed image, and which records the groups of image data on a recording medium together with link data which designates the relationship between the groups of image data (Japanese Patent Laid-Open Application No. 10-108133 (there is no corresponding foreign application)). In this case, the number of times photographed image data is read out from buffer memory 114 is increased.
In the above-described examples of the conventional art, it is necessary to read out data on a photographed image at least two times from buffer memory 114 in order to store in storage 128 groups of encoded data corresponding to the same photographed image.
If the number of times a photographed image is read out from buffer memory 114 increases, the time period through which the same photographed image is kept stored in buffer memory 114 is longer. This is virtually the same as a reduction in the capacity of buffer memory 114.
The continuous shooting ability of a camera is determined by the “virtual” storage capacity of buffer memory 114 and by the processing speed of original image processing circuit 112 and other following processing stages.
If the capacity of buffer memory 114 is increased or the processing speed of original image processing circuit 112, etc., is increased for the purpose of improving the continuous shooting ability, then a problem of an increase in power consumption arises.
This problem becomes more serious if the number of pixels of the image pickup device is increased.